package me.miencraft.plugin.superlobby.item;

import me.miencraft.plugin.superlobby.SuperLobby;
import me.miencraft.plugin.superlobby.util.VisiblePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

/**
 * @author langle__
 * @version 1.0
 */
public class HideItem extends CustomItem {

    public HideItem(@NotNull ItemProperties properties) {
        super(properties);
    }

    @Override
    public void onItemUse(Player player) {
        VisiblePlayer.disableVisibility(player);
        player.getInventory().setItemInMainHand(SuperLobby.mainConfig.getVisibleItem().toItemStack());
    }

}
